home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 15251 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.1 KB  |  44 lines

  1. Path: ix.netcom.com!netnews
  2. From: rla111@ix.netcom.com (Richard Albright)
  3. Newsgroups: comp.lang.c++
  4. Subject: Help: Illegal character error
  5. Date: 4 Apr 1996 02:46:11 GMT
  6. Organization: Netcom
  7. Message-ID: <4jvd5j$a5f@cloner2.ix.netcom.com>
  8. NNTP-Posting-Host: ix-nyc5-18.ix.netcom.com
  9. X-NETCOM-Date: Wed Apr 03  6:46:11 PM PST 1996
  10.  
  11. For some reason I am getting 2 illegal characters in a member function.
  12. The code for the problem class and member is as follows.  I'm using
  13. Borland's C++ compiler for windows. 
  14.  
  15.  
  16. class account {
  17. public:
  18.     void calc(double, float);
  19.            
  20. private:
  21.     double savbal;
  22.     static double intrate;
  23. };
  24.  
  25. void account::calc(double bal, float rate)
  26.    {
  27.     double mint;
  28.         savbal=bal;
  29.         cout<< savbal <<"\n";
  30.     mint=((savbal * rate) / 12);
  31.     savbal=mint+savbal;
  32.     cout<< mint <<"\n";
  33.     cout<< savbal <<"\n";
  34.    }
  35.  
  36. After running the debugger, my error codes are as follows:
  37.  
  38. Compiling HMWK78.CPP:
  39. Error HMWK78.CPP 37: Illegal character '|' (0x16)
  40. Error HMWK78.CPP 37: Illegal character '|' (0x03)
  41.  
  42. Can anyone offer me any suggestions on how to fix this?
  43. Thanx.
  44.